part of my_base_lib;

class LogUtils {
  static e(String msg, {String? tag}) {
    int t = DateTime.now().millisecondsSinceEpoch;
    tag = (tag == null ? '' : '$tag : ');
    String str = '${DateFormat.format(t, "HH:mm ss秒sss毫")} | $tag$msg';
    print('\x1B[31m$str\x1B[0m');
  }

  static d(String msg, {String? tag}) {
    int t = DateTime.now().millisecondsSinceEpoch;
    tag = (tag == null ? '' : '$tag : ');
    String str = '${DateFormat.format(t, "HH:mm ss秒sss毫")} | $tag$msg';
    print('\x1B[32m$str\x1B[0m');
  }
}
